from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.optimizers import RMSprop

x_data = [[73., 80., 75.],
          [93., 88., 93.],
          [89., 91., 90.],
          [96., 98., 100.],
          [73., 66., 70.]]
y_data = [[152.],
          [185.],
          [180.],
          [196.],
          [142.]]

# 创建模型
model = Sequential()
model.add(Dense(1, input_dim=3))  #输入特征=3 dense单元数=1

# 配置模型：指定优化器optimizer，损失loss
model.compile(optimizer=RMSprop(), loss='mse')

# 模型训练
model.fit(x_data, y_data, epochs=1000)  #epochs迭代次数
# 模型预测
print(model.predict(x_data))